# AUTHOR: DING
# -*- codeing = utf-8 -*-
# @Time: 2024/2/22 13:27
# @Author: 86139
# @Site: 
# @File: 10-nnModule.py
# @Software: PyCharm
# tensorboard --logdir=pytorch/logs --port=6007

# nn - neural network
import torch
import torch.nn as nn


class Model(nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, input):  # 前向
        output = input + 1
        return output


mymodel = Model()
x = torch.tensor(1.0)
output = mymodel(x)  # output = mymodel.forward(x)
print(output)
